<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>事件</title>
		<style>
			#go:active{
				font-size: 60px;
				background-color: brown; 
			}
		</style>
		<script src="../js/jquery-3.6.3.min.js"></script>
		<script>
			$(function(){
				$("#go").click(function(){
					//return window.confirm("真的要去百度？"); 
					//return false;
					let r=window.confirm("真的要去百度？"); 
					alert(r);
					return r;
				});
				$("#b1").click(function(){
					//window.location="";
					$("#go").trigger("click");//?
					return true;
				});
				$("#form1").submit(function(){
					//
					return false;
				});
			});
		</script>
	</head>
	<body>
		<a id="go" href="https://www.baidu.com">淘宝</a>
		<button type="button" id="b1">去百度</button>
		<form action="jq-14.html" method="GET" id="form1">
			<input type="text" name="sss"/>
			<input type="submit" value="搜索"/>
		</form>
	</body>
</html>